from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
db = SQLAlchemy()
migrate = Migrate()
def create_app():
    app = Flask(__name__)
    app.config.from_pyfile('settings.py', silent=True)
    db.init_app(app)
    migrate.init_app(app, db)
    from app.blog import views as blog
    app.register_blueprint(blog.bp)
    from app.blog import models
    return app
